Merged
Conversation
The seam extraction had landed partially, but src/cli/main.js still imported helper modules while keeping local parser and dispatch copies. That left the runtime brittle and previously caused src/cli/main.js to fail syntax loading once the imported names overlapped with local declarations. This commit makes main.js rely on src/cli/args.js, src/cli/dispatch.js, and src/git/index.js as the authoritative seams, and it folds the setup --current alias into the shared repo-traversal parser so setup and doctor stay aligned on the same single-repo behavior. Constraint: Preserve the existing gx command surface and nested-repo traversal semantics Rejected: Split setup --current into a separate branch | the parser extraction already owned the same seam and proof surface Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep src/cli/main.js as a dispatcher and integration point; do not reintroduce local parser or dispatch helper copies without moving ownership back deliberately Tested: node --check src/cli/main.js Tested: node --check src/cli/args.js Tested: node --check src/cli/dispatch.js Tested: node --check src/git/index.js Tested: node --test test/cli-args-dispatch.test.js Tested: node --test test/metadata.test.js Tested: node --test test/setup.test.js Tested: node --test test/doctor.test.js Tested: npm test Tested: openspec validate agent-codex-split-cli-main-args-dispatch-2026-04-22-13-48 --type change --strict Tested: openspec validate setup-current-single-repo-alias --type change --strict Tested: openspec validate --specs (no items found) Not-tested: branch finish/PR merge/cleanup flow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated by gx branch finish (PR flow).